#include"Log.hpp"
#include<memory>

using namespace LogModule;

int main()
{
    //C++ 14，构建对象，返回智能指针的做法      <>中  传策略
    // std::unique_ptr<LogStrategy> strategy = std::make_unique<ConsoleLogStrategy>();    //打印到显示器上的策略 
    // strategy->SyncLog("hello cosolelog!!!");     //这个就是往显示器上打
    
    // std::unique_ptr<LogStrategy> strategy = std::make_unique<FileLogStrategy>();    //打印到文件中的策略
    // strategy->SyncLog("hello filelog!!!");     //这个就是往文件中打
    

//测试打印信息
    // logger.EnableFileLogStrategy();       //向文件中打
    // logger(LogLevel::DEBUG,"main.cc",10) << "hello world" << 3.14 << " " << 8899 << "aaaa";
    // logger(LogLevel::DEBUG,"main.cc",10) << "hello world";
    // logger(LogLevel::DEBUG,"main.cc",10) << "hello world";
    // logger(LogLevel::DEBUG,"main.cc",10) << "hello world";
    // logger(LogLevel::DEBUG,"main.cc",10) << "hello world";
    // logger(LogLevel::DEBUG,"main.cc",10) << "hello world";

//测试宏的打印
    // Enable_Console_Log_Strategy();
    // LOG(LogLevel::DEBUG) << "hello world" <<3.14;
    // LOG(LogLevel::DEBUG) << "hello world" <<3.14;
    // LOG(LogLevel::DEBUG) << "hello world" <<3.14;
    // LOG(LogLevel::DEBUG) << "hello world" <<3.14;
    // LOG(LogLevel::DEBUG) << "hello world" <<3.14;
    // LOG(LogLevel::DEBUG) << "hello world" <<3.14;

//日志  基于策略可以随时变换
    LOG(LogLevel::DEBUG) << "hello world" <<3.14;
    LOG(LogLevel::DEBUG) << "hello world" <<3.14;
    LOG(LogLevel::DEBUG) << "hello world" <<3.14;

    return 0;
}


